\newproblem{lay:2_7_12}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 2.7.12}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
  A rotation in $\mathbb{R}^2$ usually requires four multiplications. Compute the product below and show that the matrix for a rotation
	can be factored into three shear transformations (each of which requires only one multiplication).
	\begin{center}
		$\begin{pmatrix}1&-\tan(\frac{\phi}{2}) & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{pmatrix}
		 \begin{pmatrix}1& 0 & 0 \\ -\sin(\phi) & 1 & 0 \\ 0 & 0 & 1\end{pmatrix}
		 \begin{pmatrix}1&-\tan(\frac{\phi}{2}) & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{pmatrix}$
	\end{center}
}{
  % Solution
	Multiplying the three matrices we get
	\begin{center}
		$\begin{pmatrix}1-\tan(\frac{\phi}{2})\sin(\phi) & \tan(\frac{\phi}{2})(\tan(\frac{\phi}{2})\sin(\phi)-2) \\ 0 & 1-\tan(\frac{\phi}{2})\sin(\phi) & 0 \\ 0 & 0 & 1\end{pmatrix}$
	\end{center}
	At this point, we make use of the trigonometric identity
	\begin{center}
		$\tan(\frac{\phi}{2})=\frac{\sin(\phi)}{1+\cos(\phi)}=\frac{1-\cos(\phi)}{\sin(\phi)}$
	\end{center}
	Then
	\begin{center}
		$\begin{array}{rcl}1-\tan(\frac{\phi}{2})\sin(\phi)&=&1-\frac{\sin(\phi)}{1+\cos(\phi)}\sin(\phi)=\frac{1+\cos(\phi)-\sin^2(\phi)}{1+\cos(\phi)}=
		   \frac{\cos^2(\phi)+\cos(\phi)}{1+\cos(\phi)}\\
			&=&\cos(\phi)\frac{\cos(\phi)+1}{1+\cos(\phi)}=\cos(\phi)\end{array}$
	\end{center}
	Let us simplify now $\tan(\frac{\phi}{2})(\tan(\frac{\phi}{2})\sin(\phi)-2)$:
	\begin{center}
		$\begin{array}{rcl}
			\tan(\frac{\phi}{2})(\tan(\frac{\phi}{2})\sin(\phi)-2)&=&\tan(\frac{\phi}{2})\left(\frac{1-\cos(\phi)}{\sin(\phi)}\sin(\phi) -2\right)\\
			  &=&\tan(\frac{\phi}{2})(1-\cos(\phi)-2)=\tan(\frac{\phi}{2})(-1-\cos(\phi))\\
				&=&-\frac{\sin(\phi)}{1+\cos(\phi)}(1+\cos(\phi))=-\sin(\phi)
		\end{array}$
	\end{center}
	In summary
	\begin{center}
		$\begin{pmatrix}1-\tan(\frac{\phi}{2})\sin(\phi) & \tan(\frac{\phi}{2})(\tan(\frac{\phi}{2})\sin(\phi)-2) \\ 0 & 1-\tan(\frac{\phi}{2})\sin(\phi) & 0 \\ 0 & 0 & 1\end{pmatrix}
		= \begin{pmatrix}\cos(\phi) & -\sin(\phi) & 0 \\ \sin(\phi) & \cos(\phi) & 0 \\ 0 & 0 & 1\end{pmatrix}$
	\end{center}
	That is, the multiplication of the three matrices above is the same as the application of a rotation matrix. But applying a rotation matrix involves 4 multiplications, while
	the application of the three matrices requires only 3.
}
\useproblem{lay:2_7_12}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
